#!/bin/sh
cur=$(dirname $(readlink -f "$0"))

##cnf
APP_OPS="{{JAVA_OPTS}}"
APP_MAIN={{MAIN_CLASS}}
APP_HOME=$cur/..

##run
cd $cur/..
APP_CP=$(echo lib/*.jar |tr ' ' ':')
exec java -Dapp.home=${APP_HOME} ${APP_OPS} -server -cp "runtime:${APP_CP}" ${APP_MAIN}
